//
// Created by hkkzzxz on 24-9-10.
//

#include "EmployeeAllAttendance.h"

void EmployeeAllAttendance::FillFromRow(sql::ResultSet *rs) {
    id = rs->getString("employee_id");
    name = rs->getString("name");
    phoneNumber = rs->getString("phone_number");
    checkInTime = rs->getString("check_in_time");
    checkOutTime = rs->getString("check_out_time");
    date = rs->getString("date");
    late = rs->getInt("late");
    leaveEarly = rs->getInt("leave_early");
}

const std::string &EmployeeAllAttendance::getId() const {
    return id;
}

const std::string &EmployeeAllAttendance::getName() const {
    return name;
}

const std::string &EmployeeAllAttendance::getPhoneNumber() const {
    return phoneNumber;
}

const std::string &EmployeeAllAttendance::getCheckInTime() const {
    return checkInTime;
}

const std::string &EmployeeAllAttendance::getCheckOutTime() const {
    return checkOutTime;
}

const std::string &EmployeeAllAttendance::getDate() const {
    return date;
}

bool EmployeeAllAttendance::isLate() const {
    return late;
}

bool EmployeeAllAttendance::isLeaveEarly() const {
    return leaveEarly;
}
